﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract ObracunOsobaPoreznaOlaksica typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class ObracunOsobaPoreznaOlaksicaDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<ObracunOsobaPoreznaOlaksicaDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.ObracunOsobaPoreznaOlaksica _currentObracunOsobaPoreznaOlaksica = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxObracunOsobaPoreznaOlaksicaDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxObracunOsobaPoreznaOlaksicaErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxObracunOsobaPoreznaOlaksicaBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDOsobaPoreznaOlaksica property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDOsobaPoreznaOlaksicaDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDObracunOsoba property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDObracunOsobaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Iznos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIznosDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.ObracunOsoba> _IDObracunOsobaList;
		
		/// <summary> 
		/// The list of selectable ObracunOsoba
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.ObracunOsoba> IDObracunOsobaList
		{
			get {return this._IDObracunOsobaList;}
			set 
			{
				this._IDObracunOsobaList = value;
				this.uxIDObracunOsobaDataGridViewColumn.DataSource = null;
				this.uxIDObracunOsobaDataGridViewColumn.DataSource = this._IDObracunOsobaList;
			}
		}
		
		private bool _allowNewItemInIDObracunOsobaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of ObracunOsoba
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDObracunOsobaList
		{
			get { return _allowNewItemInIDObracunOsobaList;}
			set
			{
				this._allowNewItemInIDObracunOsobaList = value;
				this.uxIDObracunOsobaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.OsobaPoreznaOlaksica> _IDOsobaPoreznaOlaksicaList;
		
		/// <summary> 
		/// The list of selectable OsobaPoreznaOlaksica
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.OsobaPoreznaOlaksica> IDOsobaPoreznaOlaksicaList
		{
			get {return this._IDOsobaPoreznaOlaksicaList;}
			set 
			{
				this._IDOsobaPoreznaOlaksicaList = value;
				this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.DataSource = null;
				this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.DataSource = this._IDOsobaPoreznaOlaksicaList;
			}
		}
		
		private bool _allowNewItemInIDOsobaPoreznaOlaksicaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of OsobaPoreznaOlaksica
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDOsobaPoreznaOlaksicaList
		{
			get { return _allowNewItemInIDOsobaPoreznaOlaksicaList;}
			set
			{
				this._allowNewItemInIDOsobaPoreznaOlaksicaList = value;
				this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.ObracunOsobaPoreznaOlaksica> _ObracunOsobaPoreznaOlaksicaList;
				
		/// <summary> 
		/// The list of ObracunOsobaPoreznaOlaksica to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.ObracunOsobaPoreznaOlaksica> ObracunOsobaPoreznaOlaksicaList
		{
			get {return this._ObracunOsobaPoreznaOlaksicaList;}
			set
			{
				this._ObracunOsobaPoreznaOlaksicaList = value;
				this.uxObracunOsobaPoreznaOlaksicaBindingSource.DataSource = null;
				this.uxObracunOsobaPoreznaOlaksicaBindingSource.DataSource = value;
				this.uxObracunOsobaPoreznaOlaksicaDataGridView.DataSource = null;
				this.uxObracunOsobaPoreznaOlaksicaDataGridView.DataSource = this.uxObracunOsobaPoreznaOlaksicaBindingSource;				
				//this.uxObracunOsobaPoreznaOlaksicaBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxObracunOsobaPoreznaOlaksicaBindingSource_ListChanged);
				this.uxObracunOsobaPoreznaOlaksicaBindingSource.CurrentItemChanged += new System.EventHandler(OnObracunOsobaPoreznaOlaksicaBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnObracunOsobaPoreznaOlaksicaBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentObracunOsobaPoreznaOlaksica = uxObracunOsobaPoreznaOlaksicaBindingSource.Current as Entities.ObracunOsobaPoreznaOlaksica;
			
			if (_currentObracunOsobaPoreznaOlaksica != null)
			{
				_currentObracunOsobaPoreznaOlaksica.Validate();
			}
			//_ObracunOsobaPoreznaOlaksica.Validate();
			OnCurrentEntityChanged();
		}

		//void uxObracunOsobaPoreznaOlaksicaBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.ObracunOsobaPoreznaOlaksica"/> instance.
		/// </summary>
		public Entities.ObracunOsobaPoreznaOlaksica SelectedObracunOsobaPoreznaOlaksica
		{
			get {return this._currentObracunOsobaPoreznaOlaksica;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxObracunOsobaPoreznaOlaksicaDataGridView.VirtualMode;}
			set
			{
				this.uxObracunOsobaPoreznaOlaksicaDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxObracunOsobaPoreznaOlaksicaDataGridView.AllowUserToAddRows;}
			set {this.uxObracunOsobaPoreznaOlaksicaDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxObracunOsobaPoreznaOlaksicaDataGridView.AllowUserToDeleteRows;}
			set {this.uxObracunOsobaPoreznaOlaksicaDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxObracunOsobaPoreznaOlaksicaDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxObracunOsobaPoreznaOlaksicaDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="ObracunOsobaPoreznaOlaksicaDataGridViewBase"/> class.
		/// </summary>
		public ObracunOsobaPoreznaOlaksicaDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxObracunOsobaPoreznaOlaksicaDataGridView = new System.Windows.Forms.DataGridView();
			this.uxObracunOsobaPoreznaOlaksicaBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxObracunOsobaPoreznaOlaksicaErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDObracunOsobaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIznosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDObracunOsobaBindingSource = new ObracunOsobaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDObracunOsobaBindingSource)).BeginInit();
			//this.uxIDOsobaPoreznaOlaksicaBindingSource = new OsobaPoreznaOlaksicaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDOsobaPoreznaOlaksicaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunOsobaPoreznaOlaksicaDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunOsobaPoreznaOlaksicaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunOsobaPoreznaOlaksicaErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxObracunOsobaPoreznaOlaksicaErrorProvider
			// 
			this.uxObracunOsobaPoreznaOlaksicaErrorProvider.ContainerControl = this;
			this.uxObracunOsobaPoreznaOlaksicaErrorProvider.DataSource = this.uxObracunOsobaPoreznaOlaksicaBindingSource;						
			// 
			// uxObracunOsobaPoreznaOlaksicaDataGridView
			// 
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.AutoGenerateColumns = false;
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn,
		this.uxIDObracunOsobaDataGridViewColumn,
		this.uxIznosDataGridViewColumn			});
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.Name = "uxObracunOsobaPoreznaOlaksicaDataGridView";
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.TabIndex = 0;	
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.EnableHeadersVisualStyles = false;
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnObracunOsobaPoreznaOlaksicaDataGridViewDataError);
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnObracunOsobaPoreznaOlaksicaDataGridViewCellValueNeeded);
			this.uxObracunOsobaPoreznaOlaksicaDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnObracunOsobaPoreznaOlaksicaDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDOsobaPoreznaOlaksicaDataGridViewColumn
			//
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.DataPropertyName = "IDOsobaPoreznaOlaksica";
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.HeaderText = "IDOsobaPoreznaOlaksica";
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.Name = "uxIDOsobaPoreznaOlaksicaDataGridViewColumn";
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDObracunOsobaDataGridViewColumn
			//
			this.uxIDObracunOsobaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDObracunOsobaDataGridViewColumn.DataPropertyName = "IDObracunOsoba";
			this.uxIDObracunOsobaDataGridViewColumn.HeaderText = "IDObracunOsoba";
			this.uxIDObracunOsobaDataGridViewColumn.Name = "uxIDObracunOsobaDataGridViewColumn";
			this.uxIDObracunOsobaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDObracunOsobaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDObracunOsobaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIznosDataGridViewColumn
			//
			this.uxIznosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIznosDataGridViewColumn.DataPropertyName = "Iznos";
			this.uxIznosDataGridViewColumn.HeaderText = "Iznos";
			this.uxIznosDataGridViewColumn.Name = "uxIznosDataGridViewColumn";
			this.uxIznosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIznosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIznosDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDObracunOsobaDataGridViewColumn
			//				
			this.uxIDObracunOsobaDataGridViewColumn.DisplayMember = "IDOsoba";	
			this.uxIDObracunOsobaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDObracunOsobaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDObracunOsobaDataGridViewColumn.DataSource = uxIDObracunOsobaBindingSource;				
				
			//
			// uxIDOsobaPoreznaOlaksicaDataGridViewColumn
			//				
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.DisplayMember = "IDOsoba";	
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDOsobaPoreznaOlaksicaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDOsobaPoreznaOlaksicaDataGridViewColumn.DataSource = uxIDOsobaPoreznaOlaksicaBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxObracunOsobaPoreznaOlaksicaDataGridView);
			this.Name = "ObracunOsobaPoreznaOlaksicaDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDObracunOsobaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDOsobaPoreznaOlaksicaBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunOsobaPoreznaOlaksicaErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunOsobaPoreznaOlaksicaDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunOsobaPoreznaOlaksicaBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				ObracunOsobaPoreznaOlaksicaDataGridViewEventArgs args = new ObracunOsobaPoreznaOlaksicaDataGridViewEventArgs();
				args.ObracunOsobaPoreznaOlaksica = _currentObracunOsobaPoreznaOlaksica;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class ObracunOsobaPoreznaOlaksicaDataGridViewEventArgs : System.EventArgs
		{
			private Entities.ObracunOsobaPoreznaOlaksica	_ObracunOsobaPoreznaOlaksica;
	
			/// <summary>
			/// the  Entities.ObracunOsobaPoreznaOlaksica instance.
			/// </summary>
			public Entities.ObracunOsobaPoreznaOlaksica ObracunOsobaPoreznaOlaksica
			{
				get { return _ObracunOsobaPoreznaOlaksica; }
				set { _ObracunOsobaPoreznaOlaksica = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxObracunOsobaPoreznaOlaksicaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnObracunOsobaPoreznaOlaksicaDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxObracunOsobaPoreznaOlaksicaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnObracunOsobaPoreznaOlaksicaDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxObracunOsobaPoreznaOlaksicaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = ObracunOsobaPoreznaOlaksicaList[e.RowIndex].ID;
						break;
					case "uxIDOsobaPoreznaOlaksicaDataGridViewColumn":
						e.Value = ObracunOsobaPoreznaOlaksicaList[e.RowIndex].IDOsobaPoreznaOlaksica;
						break;
					case "uxIDObracunOsobaDataGridViewColumn":
						e.Value = ObracunOsobaPoreznaOlaksicaList[e.RowIndex].IDObracunOsoba;
						break;
					case "uxIznosDataGridViewColumn":
						e.Value = ObracunOsobaPoreznaOlaksicaList[e.RowIndex].Iznos;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxObracunOsobaPoreznaOlaksicaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnObracunOsobaPoreznaOlaksicaDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxObracunOsobaPoreznaOlaksicaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						ObracunOsobaPoreznaOlaksicaList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDOsobaPoreznaOlaksicaDataGridViewColumn":
						ObracunOsobaPoreznaOlaksicaList[e.RowIndex].IDOsobaPoreznaOlaksica = (System.Int32)e.Value;
						break;
					case "uxIDObracunOsobaDataGridViewColumn":
						ObracunOsobaPoreznaOlaksicaList[e.RowIndex].IDObracunOsoba = (System.Int32)e.Value;
						break;
					case "uxIznosDataGridViewColumn":
						ObracunOsobaPoreznaOlaksicaList[e.RowIndex].Iznos = (System.Decimal)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
